<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据系列</title>
    <script src="../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="width: 600px;height: 400px;"></div>
</body>
    <script>
        let mychart = echarts.init(document.getElementById("main"))
        let option = {
            title:{
                text:"访问来源",
                left:"center"
            },
            series:[{
                name:"访问来源",
                //redius:'55%',
                type:'pie',
                data:[{value:335,name:"直接访问"},
                      {value:310,name:"邮件营销"},
                      {value:274,name:"联盟广告"},
                      {value:235,name:"视频广告"},
                      {value:400,name:"搜索引擎"}  
                ]
            }],
            tooltip:{},
            legend:{
                left:"right",
                orient:"vertical"
            }
        }
        mychart.setOption(option)
    </script>
</html>